﻿@model LeadVinaglue.Models.ViewPages.LEManagementModel
           
@{
    ViewBag.Title = (Model.ProductInfo != null) ? Model.ProductInfo.Title : "Error";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section MetaBinding
{    
  
	<!-- social sharing metadata -->
	<meta property="og:title" content="@Model.ProductInfo.Title" />
	<meta property="og:description" content="@Model.ProductInfo.ShortDesc" />
	<meta property="og:image" content="@Model.SharePageImageUrl" />
	<meta property="og:url" content="@Model.SharePageUrl" />
	<link rel="image_src" href="@Model.SharePageImageUrl" />

}

@if (Model != null && Model.ProductInfo != null && string.IsNullOrEmpty(Model.ErrorMessages))
{
    <div id="groupinfo">
        <h2>Chi tiết tài liệu rao vặt <span class="arr">&laquo; <a href="javascript:history.back(-1)">Về trang trước</a></span></h2>
        <div class="table-view">
            @if (!string.IsNullOrEmpty(Model.ErrorMessages))
            {
                <div class="row">
                    <div class="label">&nbsp;</div>
                    <div class="text code">@Model.ErrorMessages</div>
                </div>
            }
            <div class="row">
                <div class="label">Mã tài liệu:</div>
                <div class="text code">@Model.ProductInfo.ID</div>
            </div>
            <div class="row">
                <div class="label">Tiêu đề tin:</div>
                <div class="text name">@Model.ProductInfo.Title</div>
            </div>
            <div class="row">
                <div class="label">Ngày đăng:</div>
                <div class="text">@Convert.ToDateTime(Model.ProductInfo.DateCreated).ToString("dd-MM-yyyy")</div>
            </div>
            <div class="row">
                <div class="label">Khu vực:</div>
                    @if (Model.ProductInfo.ShowAllStates == true)
                    {
                        <div class="text">
                            Toàn quốc
                        </div>
                    }
                    else
                    {
                        <div class="text">
                            @Model.StateName
                            @if (!string.IsNullOrEmpty(Model.DistrictName))
                            {
                                <span> &raquo; @Model.DistrictName</span>
                            }
                        </div>
                    }
            </div>
            <div class="row">
                <div class="label">SHARE PAGE:</div>
                <div class="text">
                    <div class="face">
                        <span><img src="/images/icon-facebook.jpg" width="16" height="16" border="0" alt="Share This Page on Facebook" /></span>
                        <a href="http://www.facebook.com/sharer.php?u=@Model.SharePageUrl&t=@Model.SharePageTitle&screenshot=@Model.SharePageImageUrl" rel="nofollow" target="_blank">Facebook</a>
                    </div>

                    <div class="twit">
                        <span><img src="/images/icon-twitter.jpg" width="16" height="16" border="0" alt="Share This Page on Twitter" /></span>
                        <a href="http://twitter.com/share?url=@Model.ShareTwitterUrl&text=@Model.ShareTwitterTitle&via=raovat24.net&count=none" rel="nofollow" target="_blank">Twitter</a>
                    </div>

                    <div class="google">
                        <span><img src="/images/icon_googleplus.png" width="16" height="16" border="0" alt="Share This Page on Google" /></span>
                        <a href="https://m.google.com/app/plus/x/?v=compose&content=@Model.SharePageTitle" onclick="window.open('https://m.google.com/app/plus/x/?v=compose&content=@Model.SharePageTitle','gplusshare','width=450,height=300,left='+(screen.availWidth/2-225)+',top='+(screen.availHeight/2-150)+'');return false;">Google+</a>
                    </div>

		    <div class="bookmark">
                        <span><img src="/images/icon_addbookmark.png" width="16" height="16" border="0" alt="Add to Book Mark" /></span>
                        <a href="javascript:void(0)" onclick="bookmark('@Model.SharePageTitle', '@Model.SharePageUrl');">Book Mark</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>        
        @Html.Partial("_AdvLeaderBoard")
        <div class="clear"></div>
        @if (!string.IsNullOrEmpty(Model.ProductInfo.LongDesc))
        {        
            <div id="app-rv24">
                @Html.Raw(Model.ProductInfo.LongDesc)
                <div class="clear"></div>
            </div>
        }

    </div>
    if (Model.ProductList != null && Model.ProductList.Count > 0)
    {
        <div class="clear"></div>
        <h3>Các tin đăng trước:</h3>
        <div class="productlist">
            <ul>
                @foreach (var item in Model.ProductList)
                {
                    <li>
                        <a href="@item.LinkUrl"><img src="@item.ImageUrl" width="75" height="75" border="0" align="@item.Title" /></a>
                        <p class="last">                
                            <a class="headtitle" href="@item.LinkUrl">@item.Title</a>
                            <span class="datetime">@item.Time</span>
			                <span class="summary">@Html.Raw(item.Summary)</span>
                        </p>
                    </li>
                }
            </ul>
        </div>
    }
}
@if (!string.IsNullOrEmpty(Model.ErrorMessages))
{
    <div id="groupinfo">
        <h3>@Model.ErrorMessages</h3>
    </div>
}

@section DataBinding
{
    <script src="/Scripts/Lib/cleanHtmlLink.js" type="text/javascript"></script>
}
